<!DOCTYPE html>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="utils.js"></script>
<title>Fenced frame content to test Web Share</title>

<body>
<script>
window.onload = () => {
  requestAnimationFrame(() => {
    simulateGesture(async function() {
      const navigator_share_key = KEYS['navigator.share'];
      try {
        await navigator.share({text: 'hello world'});
        writeValueToServer(navigator_share_key, 'Web Share succeeded');
      } catch(error) {
        writeValueToServer(navigator_share_key, 'Web Share failed');
      }
    });
  });
};
</script>
</body>
